// 3.10
// displays 2 max number in array
#include<iostream>

int main()
{
	const int n = 10;
	int arr[n];
	std::cout << " Enter 10 number: ";
	for( int i = 0; i < n; ++i )
	{
		std::cin >> arr[i];
	}

	int max_1 = arr[0];
	int index = 0;
	for( int i = 0; i < n; ++i )
	{
		if( arr[i] > max_1 ){
			max_1 = arr[i];
			index = i;
		}
	}
	int max_2 = 0;
	if( index != 0){
		max_2 = arr[0];
		for( int i = 1; i < n; ++i)
		{
			if( max_1 == arr[i] ) continue;
			if( arr[i] > max_2 ) {
				max_2 = arr[i];
			}
		}
	}
	else
	{
		max_2 = arr[1];
		for(int i = 2; i < n; ++i)
		{
			if( max_1 == arr[i]) continue;
			if( arr[i] > max_2) {
			max_2 = arr[i];
			}
		}
	}
	std::cout << "max_1 is: " << max_1 << " max_2 is: " << max_2 << std::endl;
	return 0;
	}
